<?php

//use Illuminate\Http\Request;
use Illuminate\Routing\Router;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
//
//use Illuminate\Routing\Router;
//
//Route::middleware('auth:api')->get('/user', function (Request $request) {
//    return $request->user();
//});

Route::group([
    'namespace' => 'API',
], function (Router $router) {
    $router->post('mobile-pwd-login', 'ExhibitorInformationController@mobilePWDLogin');//手机号密码登录
    $router->post('user-update-pwd', 'ExhibitorUserController@updatePWD');//修改密码
    $router->group([
        'middleware' => 'my.auth:exhibitor_user_api',
    ], function (Router $router) {

    });

    $router->post('journal-content/add', 'JournalContentController@add');//会刊内容提交
    $router->post('journal-content/update', 'JournalContentController@update');//会刊内容修改
    $router->get('journal-content/show', 'JournalContentController@show');//会刊内容提交
    $router->get('download-zone', 'DownloadZoneController@index');//获取下载专区
    $router->post('safety-agreement/add', 'SafetyAgreementController@add');//上传安全责任书
    $router->get('safety-agreement/show', 'SafetyAgreementController@show');//查看
    $router->post('certificate/add', 'CertificateController@add');//证件信息申请
    $router->post('certificate/dell', 'CertificateController@dell');
    $router->get('certificate/show', 'CertificateController@show');
    $router->get('exhibitor/index', 'ExhibitorIndexController@index');//首页数据
    $router->get('main-business/show', 'MainBusinessController@show');
    $router->get('sms-code', 'AliSmsController@smsCode'); //发送短信
    $router->get('sms-code/is-valid', 'AliSmsController@isValid'); //检查验证码是否有效
    $router->post('qiniuyun/upload', 'QiniuController@upload');
});
